/*
 *  Copyright (C) 2011 JiangHongTiao <jjurco.sk@@@gmail.com>
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package sk.lieskove301.jianghongtiao.liaad.prisoner.statistics.charts;

import java.io.File;
import org.jfree.chart.ChartUtilities;
import sk.lieskove301.jianghongtiao.liaad.prisoner.statistics.StatisticStore;

/**
 * Date of create: May 15, 2011
 *
 * @author JiangHongTiao <jjurco.sk_gmail.com>
 * @version 2011.0515
 */
public class ShowStatistics {

    public static void showAll(StatisticStore statistics){

        ScatterPlot allMax = ScatterPlot.showDiagram(
                "Maximal score of all agents", statistics.getAllAgents(), SelectStat.FUNC_TYPE.MAX);
        ScatterPlot deadMax = ScatterPlot.showDiagram(
                "Maximal score of dead agents", statistics.getDeadAgents(), SelectStat.FUNC_TYPE.MAX);
        ScatterPlot newMax = ScatterPlot.showDiagram(
                "Maximal score of new agents", statistics.getNewAgents(), SelectStat.FUNC_TYPE.MAX);

        ScatterPlot allMean = ScatterPlot.showDiagram(
                "Mean score of all agents", statistics.getAllAgents(), SelectStat.FUNC_TYPE.MEAN);
        ScatterPlot deadMean = ScatterPlot.showDiagram(
                "Mean score of dead agents", statistics.getDeadAgents(), SelectStat.FUNC_TYPE.MEAN);
        ScatterPlot newMean = ScatterPlot.showDiagram(
                "Mean score of new agents", statistics.getNewAgents(), SelectStat.FUNC_TYPE.MEAN);

        ScatterPlot allTotal = ScatterPlot.showDiagram(
                "Total score of all agents", statistics.getAllAgents(), SelectStat.FUNC_TYPE.TOTAL);
        ScatterPlot deadTotal = ScatterPlot.showDiagram(
                "Total score of dead agents", statistics.getDeadAgents(), SelectStat.FUNC_TYPE.TOTAL);
        ScatterPlot newTotal = ScatterPlot.showDiagram(
                "Total score of new agents", statistics.getNewAgents(), SelectStat.FUNC_TYPE.TOTAL);

        ScatterPlot allAC = ScatterPlot.showDiagram(
                "Number of all agents", statistics.getAllAgents(), SelectStat.FUNC_TYPE.A_COUNT);
        ScatterPlot deadAC = ScatterPlot.showDiagram(
                "Number of dead agents", statistics.getDeadAgents(), SelectStat.FUNC_TYPE.A_COUNT);
        ScatterPlot newAC = ScatterPlot.showDiagram(
                "Number of new agents", statistics.getNewAgents(), SelectStat.FUNC_TYPE.A_COUNT);

        PieAgentsChart pac1 = new PieAgentsChart("Initial agents distribution",
                statistics.getInitialAgents().get(0), SelectStat.FUNC_TYPE.A_COUNT);
        pac1.print();
        PieAgentsChart pac2 = new PieAgentsChart("Final agents distribution",
                statistics.getFinalAgents().get(0), SelectStat.FUNC_TYPE.A_COUNT);
        pac2.print();

        BestAgentsBarChart bestAgentsAC = BestAgentsBarChart.showDiagram(
                "Number of best agents", statistics.getBest(), SelectStat.FUNC_TYPE.A_COUNT);
        BestAgentsBarChart bestAgentsMax = BestAgentsBarChart.showDiagram(
                "Best agents maximal score", statistics.getBest(), SelectStat.FUNC_TYPE.MAX);
        BestAgentsBarChart bestAgentsMean = BestAgentsBarChart.showDiagram(
                "Best agents mean score", statistics.getBest(), SelectStat.FUNC_TYPE.MEAN);
        BestAgentsBarChart bestAgentsTotal = BestAgentsBarChart.showDiagram(
                "Best agents total score", statistics.getBest(), SelectStat.FUNC_TYPE.TOTAL);

    }

}
